﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "thread.h"
#include <QPushButton>
#include <QDir>
#include <Python.h>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void initwindows();
    void connectsignal();
    bool initPythonMoudle();

private:
    Ui::MainWindow *ui;
    QThreadRead* grabThread;
    QThreadDeal* procThread;
    QThreadLearn* learnThread;
    ReadForLearn* readLearnThread;
    QThreadDisplay* displayThread;
    QDir *img_dir;

public slots:
    void displayImage(cv::Mat);
    void displayRes(int);
    void startlearn();
    void stoplearn();
    void startgrab();
    void startsort();
    void stopsort();
    void lightpress();
    void middlepress();
    void darkpress();
    void displayLearnSataus();
    void displayImageForLearn(cv::Mat);
};
#endif // MAINWINDOW_H
